/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-08-03 17:01:55
 * @LastEditTime : 2023-08-16 08:56:13
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Pages\Front\jtgj\Other.jsx
 * @Description  :
 */
import { useEffect, useState } from 'react'
import { useLocation } from 'react-router-dom'
import { sceneId, CMT_ADMIN } from './Data'

import { Province } from './Other/province'

import { OneA01 } from './Other/OneA01'
import { TwoA01 } from './Other/TwoA01'
import { ThrA01 } from './Other/ThrA01'
import { FouA01 } from './Other/FouA01'
import { FivA01 } from './Other/FivA01'
import { SixA01 } from './Other/SixA01'
import { SixA02 } from './Other/SixA02'
import { SixA03 } from './Other/SixA03'
import { SixA04 } from './Other/SixA04'
import { SevA01 } from './Other/SevA01'
import { EleA01 } from './Other/EleA01'
import { NinA01 } from './Other/NinA01'
import { TenA01 } from './Other/TenA01'

const Page = () => {
    const { pathname } = useLocation()
    const [currentPath, setCurrentPath] = useState()

    useEffect(() => setCurrentPath(pathname.split('/').at(-1)), [pathname])
    return (
        <div className={`Page ${currentPath}`}>
            {(() => {
                switch (currentPath) {
                    case 'province':
                        return <Province />
                    case 'OneA01':
                        return <OneA01 />
                    case 'TwoA01':
                        return <TwoA01 />
                    case 'ThrA01':
                        return <ThrA01 />
                    case 'FouA01':
                        return <FouA01 />
                    case 'FivA01':
                        return <FivA01 />
                    case 'SixA01':
                        return <SixA01 />
                    case 'SixA02':
                        return <SixA02 />
                    case 'SixA03':
                        return <SixA03 />
                    case 'SixA04':
                        return <SixA04 />
                    case 'SevA01':
                        return <SevA01 />
                    case 'EleA01':
                        return <EleA01 />
                    case 'NinA01':
                        return <NinA01 />
                    case 'TenA01':
                        return <TenA01 />
                    default:
                        return <div>未定义模块</div>
                }
            })()}
        </div>
    )
}

export default Page
